package com.dg.river.contant;

import com.dg.river.BuildConfig;
import com.dg.river.core.http.TokenStateEnum;

/**
 * Created by hy on 2018/10/16
 * Description : 常量
 */
public class Constant {

    //---------- 1.应用常量 --------------------
    //Package名称
    public static final String getPackage = BuildConfig.APPLICATION_ID;
    //AppVersion
    public static final String getAppVersion = BuildConfig.VERSION_NAME;
    //Authorization KEY值
    public static final String AuthorizationKey = "Authorization";
    //游客Authorization
    public static final String visitorToken = "Basic YXBwX2RldmljZTpkZWk3NzgzbmlOTkozVVVJaHl1eTdpMzJzV0w=";
    //游客Authorization
    public static final String checkTokenToken = "Basic YXBwX2NsaWVudDo0M2Rka3cyZGVFRDM0a2R5aWRsam91b3dqdTg3Mw==";
    //Content-Type KEY值
    public static final String ContentTypeKey = "Content-Type";
    //Content-Type
    public static final String contentTypeForm = "application/x-www-form-urlencoded";
    //LOG 日志内容
    public static final String LOG = "HyLog";

    public static final String BASE_TOKEN = "Bearer 5f2bef6f-bd08-447c-8da4-7a3e32c600af";
    //认证
    public static final String APP_CLIENT = "app_client";
    public static final String APP_CLIENT_VALUE = "43ddkw2deED34kdyidljouowju873";
    public static final String TRIP_AUTHORIZATION = "Authorization";
    public static final String TRIP_AUTHORIZATION_VALUE = "Basic YXBwX2RldmljZTphcHBfZGV2aWNl";
    public static final String LOGIN_AUTHORIZATION_VALUE = "Basic YXBwX2NsaWVudDo0M2Rka3cyZGVFRDM0a2R5aWRsam91b3dqdTg3Mw==";
    //Web Js 交互 key
    public static final String ANDROID_WEB_TAG = "AndroidWebView";


    //---------- 2.接口常量 --------------------
    //成功返回码
    public static final String RESULT_SUCCESS = "P00000";
    //失败返回码
    public static final String RESULT_ERROR_10001 = "P10001";
    //失败返回码
    public static final String RESULT_ERROR_10002 = "P10002";
    //失败返回码
    public static final String RESULT_ERROR_10007 = "P10007";
    //失败返回码
    public static final String RESULT_ERROR_10008 = "P10008";
    //失败返回码
    public static final String RESULT_ERROR_100301 = "P100301";
    //失败返回码
    public static final String RESULT_ERROR_10021 = "S10021";
    //失败返回码
    public static final String RESULT_ERROR_00018 = "C00018";
    //失败返回码
    public static final String RESULT_ERROR_00019 = "C00019";


    //---------- 3.功能常量 --------------------
    //-------1 广播类---------

    //-------2 第三方key---------
    //微信key
    public static final String WEXIN_KEY = "wx56034077f87af91d";

    //-------3 其他---------
    //页面显示-空页面
    public static final int CODE_EMPTY = 0;
    //页面显示-错误-网络
    public static final int CODE_ERROR_NET = 1;
    //页面显示-错误-接口错误
    public static final int CODE_ERROR_INTERFACE = 2;
    //注册短信倒计时时间（单位：秒）
    public static final int TIMER_SECONDS = 60;
    //StartActivityForResult默认requestCode
    public static final int REQUEST_CODE = 1001;
    public static final int REQUEST_CODE_1002 = 1002;
    public static final int REQUEST_CODE_1003 = 1003;
    //第一次安装
    public static final String FIRST_INSTALL = "firstInstall";

    //用户信息存储 - sp名称
    public static final String SP_USER_INFO = "USER_INFO";
    //用户信息存储 - token
    public static final String SP_USER_INFO_USER_TOKEN = "userToken";
    //用户信息存储 - 游客token
    public static final String SP_USER_INFO_VISIT_TOKEN = "visitToken";
    //用户信息存储 - userId
    public static final String SP_USER_INFO_USER_ID = "userId";
    //用户信息存储 - 用户名
    public static final String SP_USER_INFO_USER_NAME = "userName";
    //用户信息存储 - 头像
    public static final String SP_USER_INFO_USER_HEAD_AVATAR = "userHeadAvatar";
    //用户信息存储 - 登录状态
    public static final String SP_USER_INFO_LOGIN_STATE = "loginState";
    //用户信息存储 - 设备token
    public static final String SP_USER_INFO_TRIP_TOKEN = "tripToken";

    //首页数据缓存保存时间(单位：秒)
    public static final int CACHE_SAVE_TIME = 60 * 60 * 2;
    //当前token状态
    public static TokenStateEnum tokenState = TokenStateEnum.NONE;

    //用户信息存储 - 个推的cid
    public static final String SP_USER_INFO_GT_CLIENT_ID = "GT_CID";
    //上次app版本
    public static final String SP_LATEST_APP_VERSION = "LATEST_APP_VERSION";
    //用户信息存储 - 经度
    public static final String SP_LOGIN_PARENT_LAT = "parentLat";
    //用户信息存储 - 纬度
    public static final String SP_LOGIN_PARENT_LON = "parentLon";
    //首页状态栏颜色
    public static final String SP_HOME_DARK_STATUS_BAR = "SP_HOME_DARK_STATUS_BAR";

    //权限相关本地SP文件名
    public static final String SP_PERMISSION_INFO = "PERMISSION_INFO";
    //定位权限
    public static final String SP_PERMISSION_LOCATION = "PERMISSION_LOCATION";
    //相机权限
    public static final String SP_PERMISSION_CAMERA = "PERMISSION_CAMERA";
    //相机 文件权限
    public static final String SP_PERMISSION_CAMERA_DOCUMENT = "PERMISSION_CAMERA_DOCUMENT";
    //本地文件权限
    public static final String SP_PERMISSION_DOCUMENT = "PERMISSION_DOCUMENT";
    //定位权限是否请求过
    public static final String SP_PERMISSION_LOCATION_HAS_REQUEST = "PERMISSION_LOCATION_HAS_REQUEST";
}
